<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<title>R3 Query V5.0</title>
	<meta name="description" content="">
	<meta name="author" content="J.Chen">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta name="renderer" content="webkit">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" type="text/css" href="/assets/css/reset.css" >
	<link rel="stylesheet" type="text/css" href="/assets/css/login.css">
	<link rel="shortcut icon" href="/assets/images/favicon.ico" >
	
	<link href="/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
	<link href="/assets/css/reset.css" rel="stylesheet" type="text/css">
	<link href="/assets/css/zTreeStyle.css" rel="stylesheet">
	<link href="/assets/css/style.css" rel="stylesheet" type="text/css">
	<link href="/assets/css/r3.css" rel="stylesheet" type="text/css">
	<link href="/assets/js/skins/blue.css" rel="stylesheet" type="text/css">
	<link href="/assets/css/other.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" href="/assets/css/jquery-ui-1.10.4.custom.css">

	<script type="text/javascript" src="/assets/js/jquery-1.10.2.min.js"></script>			<!--jQuery库-->
	<script type="text/javascript" src="/assets/js/jquery-ui-1.10.4.custom.min.js"></script><!--jQueryUI库-->

	<script type="text/javascript" src="/assets/js/artDialog.min.js"></script>				<!--artDialog-->
	<script type="text/javascript" src="/assets/js/artDialog.plugins.min.js"></script>		<!--artDialog-->
	<script type="text/javascript" src="/assets/js/R3_BigData.js"></script>					<!--R3 Javascript-->
	<script type="text/javascript" src="/assets/js/R3_BigData.action.js"></script>					<!--R3 Javascript-->
	
	<script type="text/javascript" src="/assets/js/jquery.validate.js"></script>
	<script type="text/javascript" src="/assets/js/jquery.metadata.js"></script>
	<script type="text/javascript" src="/assets/js/messages_cn.js"></script> 				<!--表单验证-->
	<script type="text/javascript" src="/assets/js/jquery.form.js"></script> 				<!--表单验证-->
</head>
<body>
<div class="container loginWrapper"><!-- Everything started here -->
	<img src="/assets/images/loginBg.jpg" class="loginImgBg" alt="">
	<div class="loginCon" style="border:1px solid #cdcdcd;">
		<form id="loginForm" action="/${orgi}/login.html" class="loginFormWrapper" method="post">
			<span class="lfFonts">用户名：</span>
			<input type="text" name="username" id="username" class="lfInputs lgUsername required">
			<span class="lfFonts">密码：</span>
			<input type="password" name="password" id="password" class="lfInputs lgUerPsw required">

			<#if error??><span class="lfFonts" style="color:red;">${error.text!''}</span></#if>
			<input type="button" onclick="submitForm()" class="lgsubmitbtn" value="">
			
		</form>
	</div>
</div>
</body>
</html>
<SCRIPT type="text/javascript">
	if(document.getElementById('username').value==""){
		document.getElementById('username').focus();
	}else{
		document.getElementById('password').focus();
	}
	
	function submitForm(){
		if($("#loginForm").valid()){
			$("#loginForm").ajaxSubmit({	  
				url:"/${orgi}/checkpassword.html",
				success: function(data){
					if(data=="yes"){
						var reg = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,255}$|^(?=.*\d)(?=.*[a-z])(?=.*[-.!@#$%^&*()+?><]).{8,255}$|^(?=.*\d)(?=.*[A-Z])(?=.*[-.!@#$%^&*()+?><]).{8,255}$|^(?=.*[a-z])(?=.*[A-Z])(?=.*[-.!@#$%^&*()+?><]).{8,255}$/;     
				        var result = $("#password").val().match(reg); 
						if(result!=null){
							$("#loginForm").submit();
						}else{
							tipArtPage("密码修改（提示：密码过于简单。）" , "/${orgi}/passwordupdate.html?username="+encodeURIComponent($("#username").val()),550);
						}
					}else if(data=="no"){
						tipArtPage("密码修改（提示：密码已过期。）" , "/${orgi}/passwordupdate.html?username="+encodeURIComponent($("#username").val()),550);
					}else{
						alertMsg("用户名或密码输入错误，请重新输入。");
					}
				}
			}); 
		}
		
		
	
	}
	
	
	function alertMsg(msg){
		var d;
		if(msg.length>40){
			d = art.dialog({
				id:"dialog",
				content: msg,
				width:500
			});
		}else{
			d = art.dialog({
				id:"dialog",
				time:2000,
				content: msg
			});
		}
	}


	$(document).ready(function(){
		$("input[type='checkbox']").css("border","solid 0px #fff");
		$("input[type='radio']").css("border","solid 0px #fff");
			<#if ation_message??>
			alertMsg('${ation_message}');			
			</#if>			
	});
</SCRIPT>
